#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;

const int MAXN = 3e5 + 10;
const int MOD = 1e9 + 7;

int n, a[MAXN], b[MAXN];
int dis[MAXN];

int pre[MAXN];

typedef struct Node {
    int x;
    int y;
    int steps;
} Node;

int bfs(pii st) {
    int x = st.first, y = st.second;

    memset(dis, 0x3f, sizeof(dis));

    queue<Node> q;
    q.push({ x, y, 0 });
    dis[n] = 0;
    int dep = n;
    
    while (!q.empty()) {
        auto nd = q.front();
        q.pop();

        int j = nd.x, k = nd.y;
        if (j == 0) {
            return dis[j];
        }

        for (int i = a[k]; i >= 1; i--) {
            int nextj = k - i;
            if (nextj >= dep) break;

            int nextk = nextj + b[nextj];
            if (dis[nextk] > dis[k] + 1) {
                dis[nextk] = dis[k] + 1;
                pre[nextj] = j;
                q.push({nextj, nextk, nd.steps+1});
            }
        }
        dep = min(dep, k - a[k]);
    }

    return -1;
}

int main() {
#ifdef LOCAL
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
#endif
    ios::sync_with_stdio(false), cin.tie(0);

    cin >> n;
    for (int i = 1; i <= n; i++) {
        cin >> a[i];
    }
    for (int i = 1; i <= n;i++)
        cin >> b[i];

    int res = bfs({ n, n });
    cout << res << endl;

    if (res != -1) {
        vector<int> ans;

        for (int i = 1, j = n; i <= res; i++, j = pre[j])
            ans.push_back(pre[j]);
        
        for (int i = res-1; i >= 0; i--)
            cout << ans[i] << ' ';
        cout << endl;
    }
    return 0;
}